class RcontrollersController < ApplicationController
  # GET /rcontrollers
  # GET /rcontrollers.xml
  def index
    @rcontrollers = Rcontroller.find(:all)

    respond_to do |format|
      format.html # index.rhtml
      format.xml  { render :xml => @rcontrollers.to_xml }
    end
  end

  # GET /rcontrollers/1
  # GET /rcontrollers/1.xml
  def show
    @rcontroller = Rcontroller.find(params[:id])

    respond_to do |format|
      format.html # show.rhtml
      format.xml  { render :xml => @rcontroller.to_xml }
    end
  end

  # GET /rcontrollers/new
  def new
    @rcontroller = Rcontroller.new
  end

  # GET /rcontrollers/1;edit
  def edit
    @rcontroller = Rcontroller.find(params[:id])
  end

  # POST /rcontrollers
  # POST /rcontrollers.xml
  def create
    @rcontroller = Rcontroller.new(params[:rcontroller])

    respond_to do |format|
      if @rcontroller.save
        flash[:notice] = 'Rcontroller was successfully created.'
        format.html { redirect_to rcontroller_url(@rcontroller) }
        format.xml  { head :created, :location => rcontroller_url(@rcontroller) }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @rcontroller.errors.to_xml }
      end
    end
  end

  # PUT /rcontrollers/1
  # PUT /rcontrollers/1.xml
  def update
    @rcontroller = Rcontroller.find(params[:id])

    respond_to do |format|
      if @rcontroller.update_attributes(params[:rcontroller])
        flash[:notice] = 'Rcontroller was successfully updated.'
        format.html { redirect_to rcontroller_url(@rcontroller) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @rcontroller.errors.to_xml }
      end
    end
  end

  # DELETE /rcontrollers/1
  # DELETE /rcontrollers/1.xml
  def destroy
    @rcontroller = Rcontroller.find(params[:id])
    @rcontroller.destroy

    respond_to do |format|
      format.html { redirect_to rcontrollers_url }
      format.xml  { head :ok }
    end
  end
end
